package com.xzz.dto;

import com.xzz.domain.Course;
import com.xzz.domain.CourseDetail;
import com.xzz.domain.CourseMarket;
import com.xzz.domain.CourseResource;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Data
public class CourseDto {

    // 课程
    @Valid // 开启JSR303校验
    private Course course;
    // 课程详情
    @Valid
    private CourseDetail courseDetail;
    // 课程营销
    private CourseMarket courseMarket;
    // 课程资源
    private CourseResource courseResource;
    // 课程讲师
    @NotEmpty // 集合不能为空
    private List<Long> teacherIds;

}